<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>表单验证</title>
  <script>
      function $(id){
          return document.getElementById(id);
      }


  </script>
</head>
<body>
<form method="get" id="form" name="form">
  <input type="text" id="name" name="name" required="">
  <input type="submit" value="提交">
</form>
</body>
</html>
